Skip to content

Conversation

@viduni94
Copy link
Contributor

@viduni94 viduni94 commented Nov 20, 2025

Closes https://github.com/elastic/obs-ai-assistant-team/issues/413

Summary

This PR handles APM error AI insights via Agent Builder. This is done by consuming the common AI_INSIGHT attachment and introducing an "error" attachment.

  • Adds an API to pre-fetch the error data and generate an LLM response by calling the inference client.
  • Once the summary is generated it showed inline on the page
  • The user can click on "start conversation" which opens to the agent builder flyout to continue the conversation

UI for AI insights

This PR consumes the common UI component in the observability-agent-builder package.

Testing

Observability test clusters were used for testing.

Testing instructions

  1. Connect to a Observability test cluster
  2. In Kibana, go to "Observability" --> "Service Inventory"
  3. Pick a service and visit the "Error" tab and select an error
  4. Click on "What's this error"

Screen recording

Screen.Recording.2025-12-03.at.8.12.22.PM.mov

Checklist

@viduni94 viduni94 self-assigned this Nov 20, 2025
@viduni94 viduni94 changed the title [Agent Builder] Experiment one attachment type for APM errors [Agent Builder] Observability error attachment Nov 24, 2025
@viduni94 viduni94 added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Nov 25, 2025
@viduni94 viduni94 changed the title [Agent Builder] Observability error attachment [Agent Builder] Observability "error" attachment Nov 25, 2025

const response = await inferenceClient.chatComplete({
connectorId,
messages: [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about a system message?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add that today. System prompt and refining the instructions are still pending.

const [summary, setSummary] = useState('');
const [context, setContext] = useState('');

const [lastUsedConnectorId] = useLocalStorage('agentBuilder.lastUsedConnector', '');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use this hook exposed by AB?

export function useConnectorSelection(): UseConnectorSelectionResult {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way we do not duplicate the locale storage key

@viduni94 viduni94 marked this pull request as ready for review December 4, 2025 01:13
@viduni94 viduni94 requested review from a team as code owners December 4, 2025 01:14
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ai-team (Team:obs-ai)

@botelastic botelastic bot added the Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation label Dec 4, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-presentation-team (Team:obs-presentation)

@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 4, 2025

💔 Build Failed

Failed CI Steps

History

cc @viduni94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:obs-ai Observability AI team Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants